In a storage management system, one or more storage device clients store data in storage devices. Storage devices are typically block mode devices. A block mode device provides a storage device client access to data in units referred to as a data block. A data block is an atomic unit of data from primary storage that a storage device client may request from a storage device.
To ensure availability of data on a storage device when that storage device fails or otherwise becomes unavailable, storage management systems use data mirroring. In data mirroring, a set of data is stored redundantly in a set of storage devices referred to as a mirrored set of storage devices or a mirrored set. Data stored on a storage device in a mirrored set is stored redundantly on other storage devices in the mirrored set. Storage devices in a mirrored set are referred to herein as mirror peers with respect to each other. Data mirroring ensures that when mirrored data on a storage device becomes unavailable on that storage device, a redundantly stored copy may be obtained from at least one mirror peer.
FIG. 1 is a block diagram depicting an illustrative Storage System 101 that uses data mirroring. Storage System 101 comprise storage device client 102 and storage device 111a, storage device 111b, and storage device 111c, and other storage devices not depicted. Storage device 111a, storage device 111b, and storage device 111c comprise mirrored set 110, storing and mirroring a set of data blocks. Each of storage device 111a, storage device 111b, and storage device 111c comprises primary storage devices for persistently storing data blocks. A primary storage device may be a disk-based device, a flash memory device, or other form of persistent memory. For a mirrored data block that is stored in a primary storage device of any of storage device 111a, storage device 111b, and storage device 111c, a copy of the data block is stored in a primary storage device of another of storage device 111a, storage device 111b, and storage device 111c. 
Data mirroring entails performing and participating in various kinds of core data mirroring operations. Among such operations are replicated writes, re-synchronization, and rebalancing.
In a replicated write, when a storage device client writes a data block, the data block is concurrently written to all the mirror peers for that data block. A replicated write of a data block is not considered complete until the storage device client receives acknowledgement that each of the mirror peers has written the data block.
An approach for performing a replicated write is illustrated using mirrored set 111. To execute a replicated write, storage device client 102 issues a write request for a data block to each mirror peer of mirrored set 111, transmitting the data to write for the data block to each of storage device 111a, storage device 111b, and storage device 111c. Each of storage device 111a, storage device 111b, and storage device 111c writes the data block and transmits acknowledgement of the write to storage device client 102. When a storage device writes a data block, the data block is persistently stored. Once storage device client 102 receives acknowledgement of the requested write from each of storage device 111a, storage device 111b, and storage device 111c, the write is considered committed.
In re-synchronization, a “target” mirror peer is synchronized with other mirror peers in a mirrored set. The re-synchronization may be performed as a result of mirror peer failure. The re-synchronization is performed to bring a failed mirror peer or replacement mirror peer online and in-synch with other mirror peers of the mirrored set.
Re-synchronization may be performed using client-read-writes. In a client-read-write, a storage device client issues a read request for a data block to a source storage device. The storage device transmits the requested data block to the storage device client. Once received, the storage device client writes the data block to the target storage device, transmitting the data block to write to the target storage device.
In rebalancing, a set of data blocks is moved between storage devices to rebalance I/O load between storage devices of a storage system. For example, to reduce I/O load on a storage device for a set of data blocks, the storage device is removed from the mirrored set for the set of data blocks and replaced by a new mirror peer within the mirrored set. To accomplish this switch, the set of data blocks is written to the new storage device using the client-read-write approach, where the source storage device is a member of the mirrored set and the new storage device is the target storage device.
The efficiency with which replicated writes, re-synchronization, and rebalancing are performed is important to the performance of data mirroring. Described herein in are approaches for performing these operations more efficiently.